home *** CD-ROM | disk | FTP | other *** search
- /* $VER: 1.0, ©1996 Dietmar Eilert. Number lines. */
-
- OPTIONS RESULTS /* enable return codes */
-
- if (LEFT(ADDRESS(), 6) ~= "GOLDED") then /* not started by GoldEd ? */
- address 'GOLDED.1'
-
- 'LOCK CURRENT RELEASE=4' /* lock GUI, gain access */
-
- if (RC ~= 0) then
- exit
-
- OPTIONS FAILAT 6 /* ignore warnings */
-
- SIGNAL ON SYNTAX /* ensure clean exit */
-
- /* ------------------------- INSERT YOUR CODE HERE: -------------------- */
-
- 'QUERY CAT'
- isGerman = (result = "deutsch")
-
- 'QUERY ANYTEXT'
-
- if (result = TRUE) then
-
- do
- if (isGerman) then
- 'REQUEST LONG TITLE="Erste Zeilennummer:" MIN=0 MAX=10000 VAR=FIRST'
- else
- 'REQUEST LONG TITLE="Enter 1st number:" MIN=0 MAX=10000 VAR=FIRST'
-
- if (RC = 0) then do
-
- if (isGerman) then
- 'REQUEST LONG TITLE "Schrittweite:" MIN=1 MAX=1000 OLD=10 VAR=STEP'
- else
- 'REQUEST LONG TITLE "Enter step:" MIN=1 MAX=1000 OLD=10 VAR=STEP'
-
- if (RC = 0) then do
-
- 'FOLD ALL OPEN=TRUE'
-
- 'QUERY LINES VAR=LINES'
-
- 'SET NAME=INSERT VALUE=TRUE'
-
- 'GOTO LINE=1 COLUMN=1'
-
- size = LENGTH(first + lines * step)
- number = first
-
- do line = 1 to lines
-
- 'TEXT STAY T="' || right('0000000' || number, size) || ' "'
- 'DOWN'
-
- number = number + step
- end
- end
- end
- end
-
- else do
-
- if (isGerman) then
- 'REQUEST PROBLEM="Kein Text vorhanden ?!"'
- else
- 'REQUEST PROBLEM="Text buffer is empty ?!"'
- end
-
- /* ---------------------------- END OF YOUR CODE ----------------------- */
-
- 'UNLOCK' /* VERY important: unlock GUI */
-
- exit
-
- SYNTAX:
-
- SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
-
- 'UNLOCK'
-
- exit
-